package com.example.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author vivi
 * @description
 * @date 2024/5/25
 */
@RestController
@RequestMapping("/art")
@Slf4j
public class ArticleController {
//    // 1 得到日志对象
//    Logger logger = LoggerFactory.getLogger(ArticleController.class);

    @RequestMapping("/show")
    public String show() {
        log.trace("我是 slf4j 的trace");
        log.debug("我是 slf4j 的debug");
        log.info("我是 slf4j 的info");
        return "hello,love you~";
    }
}












